import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isShow:[],//头部高亮数组
    black1:"",//头部黑色背景
    isFlag:false,
  },
  getters:{

  },
  mutations: {
    //往数组加元素
    changeIsshow(state,payload){
      state.isShow.push(payload);
    },
    //给数组减元素
    changeIsshow1(state,payload){
      let i=state.isShow.indexOf(payload);
      state.isShow.splice(i,1);
    },
    //黑色背景改变state里的参数
    changebBlack(state,payload){
        state.black1=payload;
    },
    modifyAnimate(state,payload){
      state.isFlag=payload
    }
  },
  actions: {

  },
  modules: {

  }
})
